Ext.define("org.jks.ImportWindow", {
			extend : "Ext.panel.Panel",
			style:'border:1px solid #5bb6b1',
			border:false,
			width : 400,
			height : 100,
			closable : true,
			title : "导入",
			callback: undefined,
			url: '',
			desp: '描述',
			floating : true,
			initComponent : function() {
				var me = this;
				var form = Ext.create("Ext.form.Panel",{
					border : false,
					layout: 'fit',
					margin: '5 5',
					items : [{
						xtype : 'filefield',
						name: "file",
						buttonText : '选择文件 ...',
						listeners : {
							change : function(self, value, eOpts) {
								if(Ext.isEmpty(me.url)){
									Ext.Msg.alert("错误", "路径不能为空!");
									return;
								}
								form.submit({
									url : me.url,
									timeout: 20000,
									waitMsg : '上传文件中，请稍等 ...',
									success : function(form, action) {
										if(!Ext.isEmpty(me.callback)){
											me.callback();
										}
										me.close();
									},
									failure: function(form, action){
										if (!action.result.success) {
											Ext.Msg.alert("错误", action.result.msg);
										}
									}
								})
							}
						}
					}]
				});
				me.items = [{
					xtype: 'component',
					margin: '5 5',
					html: me.desp
				},form]
				me.callParent();
			}
		});